<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>佛山市飞羽演艺设备有限公司 - 位置地图</title>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
        }
        
        body {
            background-color: #f0f2f5;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        .header {
            background-color: #2c3e50;
            color: white;
            padding: 20px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .header h1 {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .header p {
            font-size: 14px;
            opacity: 0.9;
        }
        
        .map-container {
            flex: 1;
            padding: 20px;
            display: flex;
            flex-direction: column;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
        }
        
        #map {
            height: 500px;
            width: 100%;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            z-index: 1;
        }
        
        .info-panel {
            background-color: white;
            border-radius: 8px;
            padding: 15px;
            margin-top: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .info-row {
            display: flex;
            margin-bottom: 10px;
        }
        
        .info-label {
            font-weight: bold;
            min-width: 80px;
            color: #2c3e50;
        }
        
        .footer {
            background-color: #2c3e50;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            padding: 15px;
            font-size: 13px;
        }
        
        @media (max-width: 768px) {
            #map {
                height: 400px;
            }
            
            .map-container {
                padding: 15px;
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>佛山市飞羽演艺设备有限公司</h1>
        <p>专业的舞台桁架生产厂家</p>
    </div>
    
    <div class="map-container">
        <div id="map"></div>
        
        <div class="info-panel">
            <div class="info-row">
                <div class="info-label">地址：</div>
                <div>广东省佛山市南海区狮山镇小塘华富兴工业区周颖峰厂房自编7号</div>
            </div>
            <div class="info-row">
                <div class="info-label">邮箱：</div>
                <div>Nancy@urbantruss.com</div>
      </div>
         <div class="info-row">
                <div class="info-label">电话：</div>
                <div>0757-639161560</div>
            </div>
        </div>
    </div>
    
    <div class="footer">
        <p>© 2025 佛山市飞羽演艺设备有限公司 | 地图服务由高德地图提供</p>
    </div>

     <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
    <script>
        // 公司经纬度（纬度, 经度）
        const companyLat = 23.109042;
        const companyLng = 112.965449;
        
        // 初始化地图
        const map = L.map('map').setView([companyLat, companyLng], 17);
        
        // 添加高德地图图层
        L.tileLayer('https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', {
            subdomains: ['1', '2', '3', '4'],
            attribution: '&copy; <a href="https://ditu.amap.com/">高德地图</a>'
        }).addTo(map);
        
// 2. 创建标记并添加到地图
const marker = L.marker([companyLat, companyLng]).addTo(map);

// 3. (可选)添加标记的弹窗信息
marker.bindPopup(`<div>佛山市飞羽演艺设备有限公司<br/>地址...</div>`);
        
        // 添加标记弹出窗口
        marker.bindPopup(`
            <div style="text-align: center; padding: 10px;">
                <h3 style="margin: 0 0 10px; color: #2c3e50;">佛山飞羽演艺设备有限公司</h3>
                <p style="margin: 0;">广东省佛山市南海区狮山镇小塘华富兴工业区周颖峰厂房7号</p>
                <div style="margin-top: 10px; font-size: 12px; color: #7f8c8d;">
                    <i class="fas fa-phone"></i> 0757-63916156
                </div>
            </div>
        `).openPopup();
        
        // 添加地图缩放控件
        L.control.zoom({
            position: 'bottomright'
        }).addTo(map);
        
        // 添加比例尺
        L.control.scale({
            position: 'bottomleft',
            imperial: false
        }).addTo(map);
        
        // 绘制公司区域范围
        const companyArea = L.polygon([
            [companyLat + 0.0005, companyLng - 0.0005],
            [companyLat + 0.0005, companyLng + 0.0005],
            [companyLat - 0.0005, companyLng + 0.0005],
            [companyLat - 0.0005, companyLng - 0.0005]
        ], {
            color: '#3498db',
            fillColor: '#3498db',
            fillOpacity: 0.1,
            weight: 2
        }).addTo(map);
        
 
        
        // 添加地图点击事件
        map.on('click', function(e) {
            const popup = L.popup()
                .setLatLng(e.latlng)
                .setContent(`点击位置: ${e.latlng.lat.toFixed(6)}, ${e.latlng.lng.toFixed(6)}`)
                .openOn(map);
        });
        
        // 更新坐标显示
        function updateCoordinates() {
            document.getElementById('coordinates').textContent = 
                `${companyLat.toFixed(6)}, ${companyLng.toFixed(6)}`;
        }
        
        // 初始坐标显示
        updateCoordinates();
    </script>
</body>
</html>